package com.bjesc_b2c.app.appraiset.widget.dialog;

import android.content.Context;
import android.os.Handler;
import android.os.Message;
import android.widget.ProgressBar;
import android.widget.TextView;

import com.bjesc_b2c.app.appraiset.R;
import com.bjesc_b2c.app.appraiset.widget.BaseDialog;

/**
 * Created by yidong on 2017/6/2.
 */

public class DownlodeDialog extends BaseDialog {
    private TextView tv_progress;
    private ProgressBar progressbar;

    public DownlodeDialog(Context context) {
        super(context);
        initViews();
    }

    private void initViews() {
        view = inflater.inflate(R.layout.layout_downloade_dialog, null);
        tv_progress = (TextView) view.findViewById(R.id.tv_progress);
        progressbar = (ProgressBar) view.findViewById(R.id.my_progressbar);
        setContentView(view);
    }
    public Handler handler = new Handler() {

        @Override
        public void handleMessage(Message msg) {
            int progress = (int) msg.obj;
            progressbar.setProgress(progress);
            tv_progress.setText(progress+"%");
        }

    };
}
